<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/6/7
  Time: 7:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/wechat/ucenter/advice.css">
    <jsp:include page="../public/head.jsp" flush="true" />
</head>
<body>
<jsp:include page="../public/header.jsp" flush="true" />
<section>
    <div class="my_advice">
        <div class="tit">亲爱的小主，使用早范服务，有什么意见，请 赐教，伦家会在24小时内进行认真回复，还会 给优质反馈的用户提示小礼物哦~</div>
        <form id="form" onsubmit="return false" >
        <div class="cont">
            <%--<input type="textarea"     >--%>
            <textarea class="txt" name="content" id="content" maxlength="100" placeholder="请输入反馈内容" cols="52"  rows="10" oninput="textCount()"></textarea>
            <input type="hidden" name="name" value="${userinfo.trueName}">
            <input type="hidden" name="mobile" value="${userinfo.mobile}">
            <span id="tip">0/100字</span>
        </div>
        </form>
        <input type="button" name="" value="发送" class="save_btn" onclick="send()">
    </div>
</section>

<script>
    function textCount(){
        var text  =    $("#content").val();
        var counter  =    text.length;

        $("#tip").text((100-counter)+"/100字");
    };

    function send() {
        if ($("#content").val() == 0){
            tip("","请输入反馈内容",true);
            return;
        }

        $.post("/mobile/system?action=feedback",$("#form").serialize(),function (data) {
            if (!data.success){
                tip("",data.msg,true);
            }else {
                window.location.replace("/ucenter/index.do");
            }
        },"json");
    }
</script>

</body>
</html>
